Director Article

3D User Interfaces and 3D App Building Using the Chrome Library Set of Behaviors


Table of Contents

  1. Introduction
  2. Setting Up the Texture Render Format
  3. Setting Up Hardware Anti-Aliasing (FSAA)
  4. Setting Up the Shader Blend Level for Reflection
  5. Opening and Closing the Movable Parts of the Car
  6. Creating a UI on Top of the 3D Scene
  7. Changing the Camera
  8. Creating a 3D Navigation System for a Website
  9. Controlling Flash from Shockwave 3D
  10. Afterword and Conclusion

Controlling Macromedia Flash from Shockwave 3D

Now you will do almost the same thing, but in a different way. Instead of displaying an HTML document when a user clicks a model, you will have the playhead jump to a frame in an embedded Macromedia Flash movie. The FLA and SWF files of this tutorial are available in the sample files linked from the beginning of this article.

Note: You need Macromedia Flash MX 2004 to complete this section of the article. Download the trial, or purchase the full version.

  1. Start with the existing movie and select Save As to create a new one. Give it a file name of your choosing.
  2. Edit the Movie properties in the Property inspector (Movie tab). Give the Stage a size of 760 pixels in width and 600 pixels in height.

Next, you will create several different labelled keyframes. The Macromedia Flash playhead will jump to a keyframe when the mouse rolls over a given model. Another way would be to create different scenes with each a different name.

  1. In Macromedia Flash, create a new Flash movie.
  2. In the Property inspector, enter the label default for the current frame.
  3. Position the playhead on frame 20 and press F6 to create an empty keyframe.
  4. In the Property tab, enter the label small pyramid.

    The Flash Properties panel.

    Figure 31. The Flash Property inspector

    The Flash timeline with the "small pyramid" frame label.

    Figure 32. The Flash Timeline with the small pyramid frame label.

  5. Enter some relevant text on the Stage, such as small pyramid building. You could also import a picture and improve the layout or add a display effect. But keep it simple for now.
  6. Export the SWF file.
  7. In Macromedia Director, import the SWF file you just created.

    The Import files dialog box

    Figure 33. The Import files dialog box

  8. Drag and drop the SWF file from the internal cast onto the Stage, next to the W3D scene. You can tweak its position in the Tweak window or in the Sprite tab of the Property inspector.

    If you chose to link to the SWF file on importing (Media > Link to External File), you can access Macromedia Flash from within Director by clicking Launch External Editor in the contextual menu of the Flash cast member in the internal cast. This lets you modify it.

    The Launch External Editor menu option

    Figure 34. The Launch External Editor menu option

  9. Press Done in Macromedia Flash when you have finished altering the SWF file.

    Click done to return to Director

    Figure 35. Click Done to return to Director

    Using these steps, you can move back and forth between Macromedia Flash and Director until you are satisfied with the result.

    The Flash Control from Model behavior

    Figure 36. The Flash Control from Model behavior

  10. In Macromedia Director, drag and drop the Flash Control from Model behavior from the Chrome Library onto the W3D sprite, either on the Stage or in the Score. The following dialog box appears:

    The Flash Control from Model Parameters dialog box

    Figure 37. The Flash Control from Model Parameters dialog box

  11. Select Small Pyramid for the Model parameter.
  12. Select the relevant Flash Sprite number.
  13. Enter the frame label the playhead will jump to: small pyramid.
  14. By default, the 3D model rollover color is yellow. Click OK.
  15. Click the Play button in the Control panel or press Enter to start the movie.

When you roll the mouse over the small pyramid, it highlights in yellow and the mouse cursor changes to a hand. Click the small pyramid and the playhead of the Flash sprite jumps to the small pyramid label, displaying the contextual information about this building.

The completed project

Figure 38. The completed project

Here is the internal cast upon completion of the project:

The internal cast upon completion of the project

Figure 39. The internal cast upon completion of the project